package com.dingreading.cloud.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体类。
 *
 * @author Administrator
 * @since 2023-11-22
 */
@Data
@Table(value = "goods_gives")
public class GoodsGives implements Serializable {

    @Id(keyType = KeyType.Auto)
    private Long id;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private Date addTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date editTime;

    /**
     * 赠品类型 1.优惠券 2.商城商品
     */
    @ApiModelProperty(value = "赠品类型")
    private Integer type;

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    private Long goodsId;

    /**
     * 关联的商品id（商品规格id/优惠券id）
     */
    @ApiModelProperty(value = "关联的商品id")
    private Long productId;

    /**
     * 最新关联的商品名称
     */
    @ApiModelProperty(value = "关联的商品名称")
    private String productName;

    /**
     * 最新库存数
     */
    @ApiModelProperty(value = "最新库存数")
    private Integer stockNum;

    /**
     * 售卖价格
     */
    @ApiModelProperty(value = "售卖价格")
    private Double price;

    /**
     * 最新的采购价格
     */
    @ApiModelProperty(value = "最新的采购价格")
    private Double purchasePrice;

    /**
     * 状态 1.启用 0.禁用
     */
    @ApiModelProperty(value = "状态 1.启用 0.禁用")
    private Integer enabled;

    /**
     * 创建人uid
     */
    @ApiModelProperty(value = "创建人uid")
    private String addStaffUid;

    /**
     * 创建人姓名
     */
    @ApiModelProperty(value = "创建人姓名")
    private String addStaffName;

    /**
     * 更新人uid
     */
    @ApiModelProperty(value = "更新人uid")
    private String lastStaffUid;

    /**
     * 更新人姓名
     */
    @ApiModelProperty(value = "更新人姓名")
    private String lastStaffName;

}
